
<template>
 <Button icon="ios-trash" type="error" v-permission="'btnDeleteDetail'"  size="small" class="margin-right-5"  @click="clickHandler" 
    :disabled="status === '待审核' || status === '审核通过'" v-show="this.userName === this.creator">
      删除
  </Button>
   
</template>

<script>
  export default {
    accessLabel: '详情页删除',
    accessKey: 'btnDeleteDetail',
    props:{
      status:String,
      creator:String,
      required: true
    },
    data() {
      return {
        userName:''
      }
    },
    methods: {
      clickHandler () {
        this.$emit('deleteClick');
      }
    },
    mounted () {
      this.userName = this.$auth.user().name
    },
    created () {
    },
  };
</script>
